package com.yzc.model.DTO;

import jakarta.validation.Valid;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

    @Data
    public class FlightOrderDetail {
        @NotBlank(message = "航班号不能为空")
        private String flightNo;

        @NotNull(message = "起飞时间不能为空")
        private Date departureDate;

        @Valid
        @NotNull(message = "乘机人信息不能为空")
        private List<PassengerInfo> passengerInfo;

        @NotBlank(message = "舱位等级不能为空")
        private String seatClass;

        @NotNull(message = "用户ID不能为空")
        private Long userId;

        @NotNull(message = "总金额不能为空")
        @DecimalMin(value = "0.01", message = "金额必须大于0")
        private BigDecimal totalAmount;
    }